Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

872
Visualizações
Discord.js: components[0].components[0].options[1]: The specified option value is already used

I was making a self-role menu using select menus feature and an error occurred while I was trying to run the command, the part of the command code:

const Row5 = new MessageActionRow()
    .addComponents(
      new MessageSelectMenu()
      .setCustomId('pings')
      .setPlaceholder('Click to select the self-roles')
      .addOptions([
        {
          label: `Giveaways`,
          value: `giveaway`,
          emoji: '🎉'
        },
        {
          label: `Tweets`,
          value: `twitterrrr`,
          emoji: '938517355879870474'
        },
        {
          label: `YouTube Uploads`,
          value: `uploads`,
          emoji: '879396250213027880'
        },
        {
          label: `Events`,
          value: `events`,
          emoji: '🎪'
        },
        {
          label: `Chat Revive`,
          value: `revive`,
          emoji: '🌑'
        },
        {
          label: `Hold`,
          description: `Used to select the same option again`,
          value: `hold`,
          emoji: '🖐️'
        }
      ])
    )

Here is the full error:

DiscordAPIError: Invalid Form Body
components[0].components[0].options[1]: The specified option value is already used
components[0].components[0].options[2]: The specified option value is already used

[object Promise]

The error says that some option's values are not unique, but it is clearly not true, according to the code.

The interesting thing is - after I remove this part of code:

{
          label: `Tweets`,
          value: `twitterrrr`,
          emoji: '938517355879870474'
        },
        {
          label: `YouTube Uploads`,
          value: `uploads`,
          emoji: '879396250213027880'
        },

everything starts working fine. Hm.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda